/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isasim;
import isasim.instructions.*;

/**
 *
 * @author Joe
 */
public class Cpu {

        public MemoryManager memory = new MemoryManager();
        public MemoryManager mappedMemory = new MemoryManager();
        public Alu alu = new Alu();
	public RegisterHandler registers = new RegisterHandler();
        public Decode decoder = new Decode();
        public Execute execute = new Execute();
        public LDR ldr = new LDR();
        public Fetch fetch = new Fetch();

        private Cpu(){  //ensure it's a singleton
            
        }

        public static Cpu getCpu()
        {
            
            if (cpuObj == null)
                cpuObj = new Cpu();
            return cpuObj;
        }

        private static Cpu cpuObj;




}

